package xyz.jason.mybatisgenerator.util;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * @ProjectName: mybatis-generator
 * @Package: xyz.jason.mybatisgenerator.util
 * @ClassName: SchedulingUtil
 * @Author: Jason · L
 * @Description: 定时工具类
 * @Date: 2021/4/6 20:19
 * @Version: 1.0
 */
public class SchedulingUtil {

    private static final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(5);

    private SchedulingUtil(){};

    public static void remove(Runnable runnable){
        scheduledExecutorService.schedule(runnable,30, TimeUnit.SECONDS);
    }

}
